package com.pxr.oop.overLoading;

public class Overrid {
    public void out() {
        System.out.println("我是父类方法");
    }
}

class  sub extends Overrid {
    //重写
    public void out() {
        System.out.println("我是重写后的子方法");
    }

    public static void main(String[] args) {
        Overrid overrid = new Overrid();
        overrid.out();
        sub sub1 = new sub();
        sub1.out();
    }
}